
package hasthi.wsdm;

import java.util.ArrayList;
import java.util.List;

import javax.xml.namespace.QName;

import hasthi.common.ChangeListener;

public class ManagemntChangeListener implements ChangeListener{
    private List<ChangeListener> processors = new ArrayList<ChangeListener>(1);
    
    public void addChangeListner(ChangeListener listener){
        processors.add(listener);
    }
    public void propertyAdded(QName resourceName, QName propertyName) {
        for(ChangeListener listener:processors){
            listener.propertyAdded(resourceName, propertyName);
        }
    }
    public void propertyChanged(QName resourceName, QName propertyName, Object newValue) {
        for(ChangeListener listener:processors){
            listener.propertyChanged(resourceName, propertyName, newValue);
        }
    }
    public void propertyRemoved(QName resourceName, QName propertyName) {
        for(ChangeListener listener:processors){
            listener.propertyRemoved(resourceName, propertyName);
        }
    }
    public void resourceAdded(QName resourceName) {
        for(ChangeListener listener:processors){
            listener.resourceAdded(resourceName);
        }
    }
    public void resourceRemoved(QName resourceName) {
        for(ChangeListener listener:processors){
            listener.resourceRemoved(resourceName);
        }
    }
}

